{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import random "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "a = range(1,1000,1)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "random_sample() takes at most 1 positional argument (2 given)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-16-e055766d5b18>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mrandom\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msample\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m50\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      2\u001b[0m \u001b[0mc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mrandom\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msample\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m100\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mscatter\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'title_1'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mmtrand.pyx\u001b[0m in \u001b[0;36mmtrand.RandomState.random_sample\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;31mTypeError\u001b[0m: random_sample() takes at most 1 positional argument (2 given)"
     ]
    }
   ],
   "source": [
    "b = random.sample(a,50)\n",
    "c = random.sample(a,100)\n",
    "plt.scatter(b,c)\n",
    "\n",
    "plt.title('title_1')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEICAYAAABYoZ8gAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAE1lJREFUeJzt3X+w5XV93/HnKyySCDaAXAkurKuV\nUtEpSO+sWBqLIggbKqbDtMs4hrbYNRmYasaZhNRWUjNtdZpoY3BgNrAFHUpMVJQqoltiB51R9C5B\nXLKY3RCU627YS/gdndHVd/843+1cLufsPZxz7t54Ps/HzJnz/X6+n+/38/nO987rfO/nfM/3m6pC\nktSOn1ntDkiSDi2DX5IaY/BLUmMMfklqjMEvSY0x+CWpMQa/mpRkXZKnkxx2kDqV5OWHsl/SoWDw\nqxlJHkzyRoCq+m5VHVVVP+6W/d8kb59QO0ckuT7Jd5I8leTPklwwiW1Lk2DwS5O3BngI+GfAzwP/\nCfjjJOtXsU/S/2fwqwlJPgasA/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1v2SBJjZmWoR5J0pAMfklqjMEv\nSY0x+CWpMQa/JDXG4Jekxhj8ktSY/wegnFIZGpNhzgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2259dca0e10>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist(b,bins = 5,normed = False)\n",
    "plt.title('title-2')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from sklearn.cluster import KMeans\n",
    "\n",
    "data = np.random.rand(100, 2) \n",
    "#生成一个随机数据，样本大小为100, 特征数为2（这里因为要画二维图，所以就将特征设为2，至于三维怎么画？\n",
    "#后续看有没有机会研究，当然你也可以试着降维到2维画图也行）\n",
    "#data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "b = np.random.rand(100,1)\n",
    "#b\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'numpy.ndarray'>\n"
     ]
    }
   ],
   "source": [
    "c = np.random.rand(100,1)\n",
    "print(type(b))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = np.hstack((b,c))\n",
    "#data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAGqhJREFUeJzt3X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JG/8+uA15nZ/Wb2gJltq6101SiyzzcD15vZEp0HBH2onqI1ZtLrvbBCT2Jq\n0KAaeP/wniLbpKTw/pjZ9cA88JZKS1S9kftsZmcAnwXeV1eBalDk73wmndTMpXRaZ/9hZhe5+7GK\ny1aVIvt8HXCHu3/GzN5M5/GdF7n7qeqL14jK4lf0mvsSsKHn9fmc3kx7YRszO5NOU25UMyi6IvuM\nmb0V+Dhwtbv/pqayVWXcPp8DXAR838x+Sic3uZB4p2rRc/vb7r7s7k8AB+kE+1QV2ecbgLsA3P2H\nwNl01mDJVaHrfRrRg/uDwGYz22RmZ9HpMF3o22YBeG/352uBe73bU5GosfvcTVF8kU5gTz0PC2P2\n2d2fdfd17r7R3TfS6We42t0XmyluKYqc23vpdJ5jZuvopGkO11rKchXZ558DlwOY2evpBPejtZay\nXgvAe7qjZt4EPOvuvyjlm5vuTS7Q23wV8F90etk/3n3vFjoXN3T++N8EDgH/Cby26TLXsM//BvwP\n8HD330LTZa56n/u2/T6Jj5Yp+Hc24B+Bx4HHgB1Nl7mGfd4C3E9nJM3DwJ81XeYZ9/frwC+AZTq1\n9BuADwAf6Pkb39Y9Ho+VeV5rhqqISIaip2VERGQKCu4iIhlScBcRyZCCu4hIhhTcRUQypOAuIpIh\nBXcRkQwpuIuIZOj/Acn0tRQcPrzKAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2259fefd860>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(b,c)\n",
    "plt.title(u'初始点')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEICAYAAACktLTqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLC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4E/Wvh+A/CTqttdQL8/CLwX+OESr18H7AMMeB9wcJTfF+LIPah7\nto5R3367+8Pu/quFhwfIbpwSuzz/3gC7gC8Bx8bZuBLl6fcngHvc/Q0Ad39tzG0sS56+O/BrC9+f\nx7k3CIqOu3+H3jcx2gZ83TMHgPPN7MJhf1+Iwb3bPVvXLnWMu58CWvdsjVmefre7newsH7u+/Taz\njcDF7j47zoaVLM+/9xXAFWb2mJkdMLMtY2tdufL0/QvAbWY2T7bd+KdI36AxoKdc+7mPWbcReGe9\nZp5jYpO7T2Z2GzAJ/MdSWzQePfttZsuAu4GPj6tBY5Ln33s5WWrmQ2RXaf/fzK5y91+W3Lay5en7\nNPA1d7/LzN5PdjOgq9z9dPnNq0yhcS3Ekfsg92xlHPdsHZM8/cbMPgp8Drje3Y+PqW1l6tfvtwFX\nAY+Y2U/IcpF7EphUzft3/g/uftLdfww8RxbsY5en77cDfw/g7t8DVpFtrpWyXDEgrxCD+5l7tprZ\nCrIJ0z0dx7Tu2Qrp3LO1b78X0hN/QxbYU8m/9uy3u7/p7mvcfb27ryeba7je3eeqaW5h8vydf4ts\nEh0zW0OWpnlxrK0sR56+/xT4CICZvZssuL8+1laO3x7g9xeqZt4HvOnurw7906qeQe4xa/w82Yz6\n5xae20n2oYbsH/obwGHgceDSqts8pn7/I/Az4KmF//ZU3eZx9Lvj2EdIoFom57+3AV8GngV+ANxS\ndZvH2PcNwGNklTRPAddW3eYC+jwDvAqcJBul3w7cAdzR9u99z8J78oNR/861/YCISIJCTMuIiMiI\nFNxFRBKk4C4ikiAFdxGRBCm4i4gkSMFdRCRBCu4iIgn6N4DtzjKLNgHIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x225a00b24e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "estimator = KMeans(n_clusters=3)#构造聚类器，构造一个聚类数为3的聚类器\n",
    "estimator.fit(data)#聚类\n",
    "label_pred = estimator.labels_ #获取聚类标签\n",
    "centroids = estimator.cluster_centers_ #获取聚类中心\n",
    "inertia = estimator.inertia_ # 获取聚类准则的总和\n",
    "mark = ['or', 'ob', 'og', 'ok', '^r', '+r', 'sr', 'dr', '<r', 'pr']\n",
    "#这里'or'代表中的'o'代表画圈，'r'代表颜色为红色，后面的依次类推\n",
    "color = 0\n",
    "j = 0 \n",
    "for i in label_pred:\n",
    "    plt.plot([data[j:j+1,0]], [data[j:j+1,1]], mark[i], markersize = 5)\n",
    "    j +=1\n",
    "plt.title(u'经过聚类的点')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:Anaconda3]",
   "language": "python",
   "name": "conda-env-Anaconda3-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  },
  "toc": {
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
